from dataaccess import CommitteeMemberData

def join(c_id):
    """add user to committee with given id"""
    return dict()

def apply(c_id):
    """user applying for a committee. return the questions needed for this
    application"""
    return dict()

def index():
    resp = dict()
  
    #TODO: pull all committees this member is on.
    #committees = CommitteeMemberData.CommitteeMemberData().SelectCommitteeMemberByID("krmckelv@indiana.edu")
    resp['committees'] = committees

    return resp 

def admin(user_id):
    resp = dict()

    #TODO: pull the committememberdata which are in each committee of which the
    #current user is a director
    committees = {}

    staff = []
    staff.append(dict(id=1,
        name="bob",started="2010-8-30",ended="",position="member",active=False,email="bob@mail.com"))
    staff.append(dict(id=2,
        name="jessica",started="2010-1-30",ended="",position="staff",active=True,email="jessica@mail.com"))
    staff.append(dict(id=4,
        name="doofus",started="2010-1-30",ended="2010-2-30",position="staff",active=True,email="doofus@mail.com"))
    staff.append(dict(id=3,
        name="admin",started="2011-1-30",ended="2011-5-30",position="director",active=True,email="admin@mail.com"))

    committees[0] = {}

    committees[0]['staff'] = staff
    committees[0]['details'] = dict(name="tech")

    resp['committees'] = committees

    return resp 
